-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local v2 = {};
local M = _G.CommonOHOH.class.new(script);
function M.PlayToInst(self, audio_inst, Parent, playbackSpeed, loopNum)
	assert(audio_inst, "audio_inst is nil");
	playbackSpeed = playbackSpeed or 1;
	local s = audio_inst:Clone();
	s.Stopped:Connect(function()
		s:Destroy();
	end);
	s.Ended:Connect(function()
		s:Destroy();
	end);
	s.PlaybackSpeed = playbackSpeed;
	if loopNum then
		s.Looped = true;
		local v5 = s.DidLoop:Connect(function(soundId, numOfTimesLooped)
			if numOfTimesLooped == loopNum then
				s:Stop();
			end;
		end);
	end;
	s.Parent = Parent;
	s:Play();
	return s;
end;
return M;
